package org.tf;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.net.wifi.WifiManager;
import android.view.View;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {
    private WifiManager mWifiManger;
    int ids[] = {R.id.test_wifi};
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mWifiManger = (WifiManager) getSystemService(Context.WIFI_SERVICE);
        initUI();

    }
    private void initUI(){
        for(int id: ids){
            findViewById(id).setOnClickListener(this);
        }
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.test_wifi:
                startActivity(new Intent(MainActivity.this, WifiActivity.class));
                break;
            default:
                break;
        }
    }
}